isOdd.ts
zzmq.dev@gmail.com/shirt[add-clamp-n-min-max-function-new-file] / isOdd.ts
@ cfd6a75d
Download
Ladder Summary
- file This file defines and exports a function `isOdd` that takes a numeric argument and returns a boolean indicating whether the given number is odd (i.e., not evenly divisible by 2).
/**
* Determines if a number is odd.
*
* @param n - The number to check.
* @returns true if n is odd, false otherwise.
*/
export function isOdd(n: number): boolean {
return n % 2 !== 0;
}